home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / ShutDown.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  2.2 KB  |  89 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        ShutDown.a
  3. ;
  4. ;    Contains:    Shutdown Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1987-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__SHUTDOWN__') = 'UNDEFINED' THEN
  18. __SHUTDOWN__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  24.     include 'MixedMode.a'
  25.     ENDIF
  26.  
  27.  
  28. sdOnPowerOff                    EQU        1                    ;call procedure before power off.
  29. sdOnRestart                        EQU        2                    ;call procedure before restart.
  30. sdOnUnmount                        EQU        4                    ;call procedure before unmounting.
  31. sdOnDrivers                        EQU        8                    ;call procedure before closing drivers.
  32. sdOnBootVolUnmount                EQU        16                    ;call procedure before unmounting boot volume and VM volume but after unmounting all other volumes
  33. sdRestartOrPower                EQU        3                    ;call before either power off or restart.
  34. ;
  35. ; pascal void ShutDwnPower(void )
  36. ;
  37.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  38.         Macro
  39.         _ShutDwnPower
  40.             move.w              #$0001,-(sp)
  41.             dc.w                $A895
  42.         EndM
  43.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  44.         IMPORT_CFM_FUNCTION ShutDwnPower
  45.     ENDIF
  46.  
  47. ;
  48. ; pascal void ShutDwnStart(void )
  49. ;
  50.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  51.         Macro
  52.         _ShutDwnStart
  53.             move.w              #$0002,-(sp)
  54.             dc.w                $A895
  55.         EndM
  56.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  57.         IMPORT_CFM_FUNCTION ShutDwnStart
  58.     ENDIF
  59.  
  60. ;
  61. ; pascal void ShutDwnInstall(ShutDwnUPP shutDownProc, short flags)
  62. ;
  63.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  64.         Macro
  65.         _ShutDwnInstall
  66.             move.w              #$0003,-(sp)
  67.             dc.w                $A895
  68.         EndM
  69.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  70.         IMPORT_CFM_FUNCTION ShutDwnInstall
  71.     ENDIF
  72.  
  73. ;
  74. ; pascal void ShutDwnRemove(ShutDwnUPP shutDownProc)
  75. ;
  76.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  77.         Macro
  78.         _ShutDwnRemove
  79.             move.w              #$0004,-(sp)
  80.             dc.w                $A895
  81.         EndM
  82.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  83.         IMPORT_CFM_FUNCTION ShutDwnRemove
  84.     ENDIF
  85.  
  86.  
  87.     ENDIF ; __SHUTDOWN__ 
  88.  
  89.